#include "lws_triedict.h"

using namespace LWS;

int main(int argc, char *argv[])
{
    if(argc != 5)
    {
	printf("expandict <trie_inputbinfile> <CHAR_inputfile> "
		"<new_word_inputfile> <new_trie_outputbinfile>\n");

	printf("Sample: expandict ./data/trie.dat ./data/CHAR.txt "
		"./corpus/new_word.txt ./data/new_trie.dat\n");

	return -1;
    }

    CTrieDict *td = new CTrieDict;
    if(!td->Load(argv[1], argv[2])) {
	return -1;
    }

    CExpanDict ed(td);
    ed.Expand(argv[3]);
    ed.Output(argv[4]);

    return 0;
}
